package battle_ship.map.vo;

public class BattleMap {
	private int mapSize;
	private int sizeX;
	private int sizeY;
	
	public BattleMap() {	}
	
	public BattleMap(int mapSize) {
		super();
		this.mapSize = mapSize;
		this.sizeX = mapSize;
		this.sizeY = mapSize + 1;
	}
	
	public int getMapSize() {
		return mapSize;
	}
	public void setMapSize(int mapSize) {
		this.mapSize = mapSize;
	}
	public int getSizeX() {
		return sizeX;
	}

	public void setSizeX(int sizeX) {
		this.sizeX = sizeX;
	}

	public int getSizeY() {
		return sizeY;
	}

	public void setSizeY(int sizeY) {
		this.sizeY = sizeY;
	}

	@Override
	public String toString() {
		return "BattleMap [mapSize=" + mapSize + ", sizeX=" + sizeX
				+ ", sizeY=" + sizeY + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + mapSize;
		result = prime * result + sizeX;
		result = prime * result + sizeY;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BattleMap other = (BattleMap) obj;
		if (mapSize != other.mapSize)
			return false;
		if (sizeX != other.sizeX)
			return false;
		if (sizeY != other.sizeY)
			return false;
		return true;
	}

}
